<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>通过表单发送真实请求</title>
</head>
<body>
<h2>发送GET请求</h2>
<form th:action="@{/form/get}" method="get">
    用户名：<input name="userName" type="text"><br>
    密  码：<input name="userPwd" type="password"><br>
    <button type="submit">发送</button>
</form>
<h2>发送POST请求</h2>
<form th:action="@{/form/post}" method="post" enctype="application/x-www-form-urlencoded">
    用户名：<input name="userName" type="text"><br>
    密  码：<input name="userPwd" type="password"><br>
    <button type="submit">发送</button>
</form>
<h2>文件上传</h2>
<form th:action="@{/form/upload}" method="post" enctype="multipart/form-data">
    用户名：<input name="userName" type="text"><br>
    密  码：<input name="userPwd" type="password"><br>
    上传文件：<input type="file" name="upload"><br/>
    <button type="submit">提交</button>
</form>

</body>
</html>